import Vue from 'vue'
import Router from 'vue-router'
import Home from './components/home.vue'


Vue.use(Router)

export default new Router({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component: Home},
    {path:'/member',component: ()=> import('./components/member.vue')},
    {path:'/search',component: ()=> import('./components/search.vue')},
    {path:'/shopcar',component: ()=> import('./components/shopcar.vue')},
    {path:'/home/newslist',component: ()=> import('./components/home/newslist.vue')},
    {path:'/home/newsinfo/:id',component: ()=> import('./components/home/newsinfo.vue')},
    {path:'/home/photo',component: ()=> import('./components/photo/tupian.vue')},
    {path:'/home/photoinfo/:id',name:'photoinfo',component: ()=> import('./components/photo/photoinfo.vue')},
    {path:'/home/goodslist',component: ()=> import('./components/goods/goodslist.vue')},
    {path:'/home/goodsinfo/:id',component: ()=> import('./components/goods/goodsinfo.vue')}
  ],
  linkActiveClass: "mui-active"
})
